from flask import Flask
from blue.blue_book import blue_print
from book_shujuku import db

app = Flask(__name__)

# 加载配置文件
app.config.from_pyfile("config.py")

# 给数据库表 book_shujuku   设置app
db.init_app(app)

# 创建蓝图
app.register_blueprint(blue_print, url_prefix="/")

if __name__ == '__main__':
    app.run()

